<template>
	<div>
		<div class="graybg"></div>
		<!--头部-->
		<header id="header">
			<div class="header header_bg clearfix">
				<div class="header_left pull-left">
					<i class="iconfont baiColor" onclick="javascript:history.back(-1)">&#xe612;</i>
				</div>
				<div class="header_center baiColor">收款记录</div>
			</div>
		</header>
		<div class="main _width">
			<div class="main-main marginAuto" v-if="holder">
				<div class="main-each _width clearfix" v-for="each in eachs">
					<div class="each_img pull-left">
						<img :src="each.u_img"/>
					</div>
					<div class="each-text pull-left">
						<h4 v-text="each.u_name"></h4>
						<p v-text="each.money_ye_date"></p>
					</div>
					<div class="money pull-right">
						<span>+{{each.money_ye_money}}</span>
					</div>
				</div>
			</div>
			<div v-else>
				<img style="display: block; width: 200px;height: 200px;margin:50px auto;" src="../assets/fuwucenter.png"/>
			</div>
		</div>
	</div>
</template>

<script>
	export default{
		data(){
			return{
				holder:true,
				eachs:[
				{
					img:"",	//头像
					eachid:"000000",	//名字	
					time:"00-00",	//时间
					money:"00.00"	//钱数
				},
				]
			}
		},
		mounted(){
			let _this = this;
			var info = window.localStorage.data;
			var params = new URLSearchParams();
			params.append('token', info);	//客户秘钥（信息）
			this.$axios({
			   url:"Home/Money/shop_money_record",
				method:"post",
				data:params
			 }).then(function(res){
				if(res.data.code == 2){
					_this.holder = false;
				}else{
					_this.holder = true;
					_this.eachs = res.data.data;
				}
			}).catch(function(err){
				console.log(err)		
			})
		}
	}
</script>

<style scoped>
	@import "../css/public.css";
	.main{
		padding-top: 45px;
	}
	.main-main{
		width: 90%;
		padding: 5px;
		background: #fff;
		padding-bottom: 20px;
	}
	.main-each{
		height: 50px;
		border-bottom: 1px solid #e8e4e4;
	}
	.each_img{
		width: 38px;
		height: 38px;
		margin-right: 8px;
		margin-top: 7px;
	}
	.each_img img{
		width: 100%;
		height: 100%;
		border-radius: 8px;
	}
	.each-text h4{
		color: #333333;
		font-size: 16px;
		line-height: 22px;
	}
	.each-text p{
		font-size: 12px;
		color: #999;
		line-height: 22px;
	}
	.money{
		line-height: 50px;
		color:#F3961F;
		font-size: 16px;
	}
	
</style>